import service from "../utils/request";

export const addUser = (form)=>{
    return service({
        method:'post',
        url:`/user/register`,
        data:form
    })
}

export const userInfo = ()=>{
    return service({
        url:`/protected-route`,
    })
}


export const getUserDetails = (form)  => {
    return service({
        url:'/user/get',
        params:form
    })
}

export const getUserList = ()  => {
    return service({
        url:'/user/list/all'
    })
}

export const userlogin = (form)  => {
    return service({
        method:'post',
        url:'/login',
        data:form
    })
}

// export const getUserList = ()  => {
//     return service({
//         url:'/api/users'
//     })
// }